<?php
/**
 * Created by PhpStorm.
 * @User: 王崇全
 * @Date: 2018/11/1 9:54
 */

namespace app\adm\controller;


use app\common\model\Config;

class ComController extends BaseController
{
    /**
     * 获取系统配置
     * @author 王海东
     * @date
     * @return void
     */
    public function CfgInit()
    {
        $c = new Config();
        rjd($c->get());
    }

    /**
     * 修改系统配置
     * @author 王海东
     * @date
     * @return void
     */
    public function setCfg()
    {
        $in = $this->I([
            [
                "key|配置名称",
                null,
                "s",
                "require",
            ],
            [
                "value|配置值",
                null,
                "s",
            ]
        ]);

        $c = new Config();
        $c->set($in['key'],$in['value']);

        rj();
    }
}